﻿using QBWeb.Models.QuestionFolder;

namespace QBWeb.Models.TestFolder
{
    public class AnswerInfoTb
    {
        public int Id { get; set; }

        //public User User { get; set; }//暂时不用
        /// <summary>
        /// 学生Id
        /// </summary>
        public string UserName { get; set; }

        public TestPaperTb TestPaperTb { get; set; }
        /// <summary>
        /// 试卷Id
        /// </summary>
        public int TestPaperTbId { get; set; }

        public QuestionTb QuestionTb { get; set; }
        /// <summary>
        /// 题目Id
        /// </summary>
        public int QuestionTbId { get; set; }

        /// <summary>
        /// 学生答案
        /// </summary>
        public string Answer { get; set; }

        /// <summary>
        /// 判断学生的答案是否正确（1表示对，0表示错）
        /// </summary>
        public int TF { get; set; }

        /// <summary>
        /// 学生的得分
        /// </summary>
        public int? Score { get; set; }

        public AnswerInfoTb() { }
        public AnswerInfoTb(string userName,int testPaperTbId, int questionTbId, string answer, int tF, int score)
        {
            UserName = userName;
            TestPaperTbId = testPaperTbId;
            QuestionTbId = questionTbId;
            Answer = answer;
            TF = tF;
            Score = score;
        }
    }
}